#ifndef CCANVAS_H
#define CCANVAS_H

#include <wx/scrolwin.h>
#include <wx/dcclient.h>
#include <wx/msgdlg.h>
#include "CHanoi.h"
#define LEFT_BASE 50
#define COLUMN_INTERVAL 300
#define COLUMN_RADIUS 5
#define LEFT_COLUMN 200
#define COLUMN_LENGTH 240
#define BASE_LINE 400
#define BASE_THICKNESS 20
#define PLATE_THICKNESS 20
#define PLATE_DISTANCE 30
#define MAX_PLATE 140
#define PLATE_DIFF 20
#define HANDLE_RADIUS 10
#define HANDLE_LENGTH 80
#define ARROW_RADIUS 20
#define ARROW_HEIGHT 40
#define MARK_TOP 430
#define MARK_SIZE 20
#define STEP_MID 500
#define STEP_TOP 20
#define STEP_SIZE 20


class CCanvas : public wxScrolledWindow
{
    public:
        CCanvas(wxWindow *lpParentFrame);
        wxBrush lpbr[14];
        int iBaseWidth, iColumnTop, iColumeDiameter, lpiPlateRadius[7];
        int iHand, iSelect;

    protected:
        void OnSize(wxSizeEvent &event);
        void OnPaint(wxPaintEvent &event);
        void OnLeftButtonUp(wxMouseEvent &event);
        void OnKeyUp(wxKeyEvent &event);
        CHanoi hanoi;

    private:
        void DrawBases(wxPaintDC &dc);
        void DrawPlates(wxPaintDC &dc);
        void DrawHand(wxPaintDC &dc);
        void DrawMark(wxPaintDC &dc);
        DECLARE_EVENT_TABLE()
};

#endif // CCANVAS_H
